<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<input type="button" value="点我你试试" onclick="dianji(this)"/>
<script type="text/javascript">
    function dianji(object) {
        console.log(object);
    }



    window.onload = ()=> {
        let imgObj = document.querySelector("img");
        // 进行打印
        console.log(imgObj);
    }
</script>
<img src="xiaoxiao">
</body>
</html>